//
//  ViewController.m
//  UI02_homework02
//
//  Created by aaaaaa on 16/6/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "Animation.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createInterface];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)createInterface{
    UIImage *backgroundImage = [UIImage imageNamed:@"BackGround.png"];
    UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:backgroundImage];
    backgroundImageView.frame = [UIScreen mainScreen].bounds;
    [self.view addSubview:backgroundImageView];
    [backgroundImageView release];
    
    Animation *flower = [Animation createFlowerWithFrame:CGRectMake(70, 100, 73, 74)];
    [backgroundImageView addSubview:flower];
    
    Animation *gua = [Animation createGuaWithFrame:CGRectMake(250, 80, 106, 98)];
    [backgroundImageView addSubview:gua];
    
    Animation *plants = [Animation createPlantsWithFrame:CGRectMake(60, 340, 106, 107)];
    [backgroundImageView addSubview:plants];
    
    Animation *zombie = [Animation createZombieWithFrame:CGRectMake(200, 150, 164, 144)];
    [backgroundImageView addSubview:zombie];
    
    Animation *bZombie1 = [Animation createBZombieWithFrame:CGRectMake(200, 300, 205, 163)];
    [backgroundImageView addSubview:bZombie1];
    
    Animation *bZimbie2 = [Animation createBZombieWithFrame:CGRectMake(200, 420, 205, 163)];
    [backgroundImageView addSubview:bZimbie2];
    
}



@end
